{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport Cell from \"../Cell\";\nimport TableContext from \"../context/TableContext\";\nimport { useContextSelector } from \"../ContextSelector\";\nimport { getCellFixedInfo } from \"../utils/fixUtil\";\nimport { getColumnsKey } from \"../utils/valueUtil\";\nfunction HeaderRow(_ref) {\n  var cells = _ref.cells,\n    stickyOffsets = _ref.stickyOffsets,\n    flattenColumns = _ref.flattenColumns,\n    RowComponent = _ref.rowComponent,\n    CellComponent = _ref.cellComponent,\n    tdCellComponent = _ref.tdCellComponent,\n    onHeaderRow = _ref.onHeaderRow,\n    index = _ref.index;\n  var _useContextSelector = useContextSelector(TableContext, ['prefixCls', 'direction']),\n    prefixCls = _useContextSelector.prefixCls,\n    direction = _useContextSelector.direction;\n  var rowProps;\n  if (onHeaderRow) {\n    rowProps = onHeaderRow(cells.map(function (cell) {\n      return cell.column;\n    }), index);\n  }\n  var columnsKey = getColumnsKey(cells.map(function (cell) {\n    return cell.column;\n  }));\n  return /*#__PURE__*/React.createElement(RowComponent, rowProps, cells.map(function (cell, cellIndex) {\n    var column = cell.column;\n    var fixedInfo = getCellFixedInfo(cell.colStart, cell.colEnd, flattenColumns, stickyOffsets, direction);\n    var additionalProps;\n    if (column && column.onHeaderCell) {\n      additionalProps = cell.column.onHeaderCell(column);\n    }\n    return /*#__PURE__*/React.createElement(Cell, _extends({}, cell, {\n      scope: column.title ? cell.colSpan > 1 ? 'colgroup' : 'col' : null,\n      ellipsis: column.ellipsis,\n      align: column.align,\n      component: column.title ? CellComponent : tdCellComponent,\n      prefixCls: prefixCls,\n      key: columnsKey[cellIndex]\n    }, fixedInfo, {\n      additionalProps: additionalProps,\n      rowType: \"header\"\n    }));\n  }));\n}\nHeaderRow.displayName = 'HeaderRow';\nexport default HeaderRow;","map":{"version":3,"names":["_extends","React","Cell","TableContext","useContextSelector","getCellFixedInfo","getColumnsKey","HeaderRow","_ref","cells","stickyOffsets","flattenColumns","RowComponent","rowComponent","CellComponent","cellComponent","tdCellComponent","onHeaderRow","index","_useContextSelector","prefixCls","direction","rowProps","map","cell","column","columnsKey","createElement","cellIndex","fixedInfo","colStart","colEnd","additionalProps","onHeaderCell","scope","title","colSpan","ellipsis","align","component","key","rowType","displayName"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/rc-table/es/Header/HeaderRow.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport Cell from \"../Cell\";\nimport TableContext from \"../context/TableContext\";\nimport { useContextSelector } from \"../ContextSelector\";\nimport { getCellFixedInfo } from \"../utils/fixUtil\";\nimport { getColumnsKey } from \"../utils/valueUtil\";\n\nfunction HeaderRow(_ref) {\n  var cells = _ref.cells,\n      stickyOffsets = _ref.stickyOffsets,\n      flattenColumns = _ref.flattenColumns,\n      RowComponent = _ref.rowComponent,\n      CellComponent = _ref.cellComponent,\n      tdCellComponent = _ref.tdCellComponent,\n      onHeaderRow = _ref.onHeaderRow,\n      index = _ref.index;\n\n  var _useContextSelector = useContextSelector(TableContext, ['prefixCls', 'direction']),\n      prefixCls = _useContextSelector.prefixCls,\n      direction = _useContextSelector.direction;\n\n  var rowProps;\n\n  if (onHeaderRow) {\n    rowProps = onHeaderRow(cells.map(function (cell) {\n      return cell.column;\n    }), index);\n  }\n\n  var columnsKey = getColumnsKey(cells.map(function (cell) {\n    return cell.column;\n  }));\n  return /*#__PURE__*/React.createElement(RowComponent, rowProps, cells.map(function (cell, cellIndex) {\n    var column = cell.column;\n    var fixedInfo = getCellFixedInfo(cell.colStart, cell.colEnd, flattenColumns, stickyOffsets, direction);\n    var additionalProps;\n\n    if (column && column.onHeaderCell) {\n      additionalProps = cell.column.onHeaderCell(column);\n    }\n\n    return /*#__PURE__*/React.createElement(Cell, _extends({}, cell, {\n      scope: column.title ? cell.colSpan > 1 ? 'colgroup' : 'col' : null,\n      ellipsis: column.ellipsis,\n      align: column.align,\n      component: column.title ? CellComponent : tdCellComponent,\n      prefixCls: prefixCls,\n      key: columnsKey[cellIndex]\n    }, fixedInfo, {\n      additionalProps: additionalProps,\n      rowType: \"header\"\n    }));\n  }));\n}\n\nHeaderRow.displayName = 'HeaderRow';\nexport default HeaderRow;"],"mappings":"AAAA,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAOC,IAAI,MAAM,SAAS;AAC1B,OAAOC,YAAY,MAAM,yBAAyB;AAClD,SAASC,kBAAkB,QAAQ,oBAAoB;AACvD,SAASC,gBAAgB,QAAQ,kBAAkB;AACnD,SAASC,aAAa,QAAQ,oBAAoB;AAElD,SAASC,SAAS,CAACC,IAAI,EAAE;EACvB,IAAIC,KAAK,GAAGD,IAAI,CAACC,KAAK;IAClBC,aAAa,GAAGF,IAAI,CAACE,aAAa;IAClCC,cAAc,GAAGH,IAAI,CAACG,cAAc;IACpCC,YAAY,GAAGJ,IAAI,CAACK,YAAY;IAChCC,aAAa,GAAGN,IAAI,CAACO,aAAa;IAClCC,eAAe,GAAGR,IAAI,CAACQ,eAAe;IACtCC,WAAW,GAAGT,IAAI,CAACS,WAAW;IAC9BC,KAAK,GAAGV,IAAI,CAACU,KAAK;EAEtB,IAAIC,mBAAmB,GAAGf,kBAAkB,CAACD,YAAY,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IAClFiB,SAAS,GAAGD,mBAAmB,CAACC,SAAS;IACzCC,SAAS,GAAGF,mBAAmB,CAACE,SAAS;EAE7C,IAAIC,QAAQ;EAEZ,IAAIL,WAAW,EAAE;IACfK,QAAQ,GAAGL,WAAW,CAACR,KAAK,CAACc,GAAG,CAAC,UAAUC,IAAI,EAAE;MAC/C,OAAOA,IAAI,CAACC,MAAM;IACpB,CAAC,CAAC,EAAEP,KAAK,CAAC;EACZ;EAEA,IAAIQ,UAAU,GAAGpB,aAAa,CAACG,KAAK,CAACc,GAAG,CAAC,UAAUC,IAAI,EAAE;IACvD,OAAOA,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